﻿#御用新聞
pbi_je_pro_government_newspaper = {
	should_be_pinned_by_default = no
	icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

	is_shown_when_inactive = {
		NOT = { has_variable = pbi_flag_completed_je_pro_government_newspaper }
		has_technology_researched = mass_communication
	}

	possible = {
		any_scope_state = {
			has_building = building_pbi_publishing_industry
		}
		any_interest_group = {
			is_in_government = yes
			# OR = {
			# 	has_ideology = ideology_paternalistic
			# 	has_ideology = ideology_stratocratic
			# 	has_ideology = ideology_moralist
			# 	has_ideology = ideology_loyalist
			# 	has_ideology = ideology_patriotic
			# 	has_ideology = ideology_reactionary
			# }
			leader = {
				has_trait = pbi_trait_journalist
			}
		}
		any_interest_group = {
			count = 0
			is_in_government = no
			is_powerful = yes
			leader = {
				has_trait = pbi_trait_journalist
			}
		}
	}

	is_progressing = {
	}
	complete = {
		OR = {
			any_interest_group = {
				count = 0
				is_in_government = yes
				leader = {
					has_trait = pbi_trait_journalist
				}
			}
			any_interest_group = {
				count > 0
				is_in_government = no
				is_powerful = yes
				leader = {
					has_trait = pbi_trait_journalist
				}
			}
		}
	}
	on_complete = {
		trigger_event = {
			id = pbi_publishing_industry_events.100 #活発な議論
			popup = yes
		}
		set_variable = {
			name = pbi_flag_completed_je_pro_government_newspaper
		}
	}

	on_monthly_pulse = {
		random_events = {
			50 = 0
			1 = pbi_publishing_industry_events.105 #政府の広報誌を野党キャラが批判
			1 = pbi_publishing_industry_events.110 #政府発表を優先的に渡せと言ってくる
			1 = pbi_publishing_industry_events.115 #法律改正を新聞が後押し
			1 = pbi_publishing_industry_events.120 #御用新聞が野党を攻撃する
			1 = pbi_publishing_industry_events.125 #御用新聞だと言われて政府批判が広がる
		}
	}

	invalid = {
	}

	weight = 100
	inheritable = no
}
#新聞は嘘だらけ
pbi_je_full_of_lies = {
	should_be_pinned_by_default = no
	icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

	is_shown_when_inactive = {
		has_technology_researched = mass_communication
	}

	possible = {
		any_scope_building = {
			is_building_type = building_pbi_publishing_industry
			is_under_construction = no
			OR = {
				has_active_production_method = pbi_pm_rotary_presses
				has_active_production_method = pbi_pm_linotype
			}
		}
	}

	is_progressing = {
	}

	complete = {
		average_sol > 12
		any_scope_pop = {
			count < 50
			strata = poor
			standard_of_living < 10
			pop_is_discriminated = no
		}
	}
	on_complete = {
		trigger_event = {
			id = pbi_publishing_industry_events.200 #サンタはいますか？
			popup = yes
		}
	}

	on_monthly_pulse = {
		random_events = {
			50 = 0
			1 = pbi_publishing_industry_events.205 #高級紙が大衆紙を批判
			1 = pbi_publishing_industry_events.210 #キャラクターが名誉毀損を訴える
			1 = pbi_publishing_industry_events.215 #蔓延する剽窃
			1 = pbi_publishing_industry_events.220 #暴力・犯罪記事
			1 = pbi_publishing_industry_events.225 #月の人類（アメリカ）
			1 = pbi_publishing_industry_events.230 #一世紀以上生きる老女（アメリカ）
			1 = pbi_publishing_industry_events.235 #ネッシー（カメラ）
			1 = pbi_publishing_industry_events.236 #ネッシー（カメラ）
			1 = pbi_publishing_industry_events.237 #ネッシー（カメラ）
			1 = pbi_publishing_industry_events.240 #妖精（カメラ）
			1 = pbi_publishing_industry_events.245 #人の言葉を理解する馬
			1 = pbi_publishing_industry_events.246 #人の言葉を理解する馬
			1 = pbi_publishing_industry_events.250 #口笛を吹く少年
		}
	}

	weight = 100
	inheritable = no
}
#ジャーナリズム精神
pbi_je_journalism = {
	should_be_pinned_by_default = no
	icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

	is_shown_when_inactive = {
		has_technology_researched = mass_communication
	}

	possible = {
		has_technology_researched = mass_communication
		literacy_rate >= pbi_publishing_industry_literacy_rate
	}

	is_progressing = {
	}

	complete = {
		literacy_rate >= 0.65
		pop_type_percent_country = {
			pop_type = pbi_journalists
			percent > 0.01
		}
	}
	on_complete = {
		trigger_event = {
			id = pbi_publishing_industry_events.300 #ジャーナリストの義務
			popup = yes
		}
	}

	on_monthly_pulse = {
		random_events = {
			50 = 0
			1 = pbi_publishing_industry_events.305 #技師が技術を伝える
			1 = pbi_publishing_industry_events.310 #実業家が出版業を始める
			1 = pbi_publishing_industry_events.315 #編集主幹の舌戦
			1 = pbi_publishing_industry_events.320 #発行禁止処分
			1 = pbi_publishing_industry_events.325 #新聞売りの少年たちのストライキ
			1 = pbi_publishing_industry_events.330 #ヘレン・ジューエット殺人事件
			1 = pbi_publishing_industry_events.335 #トロップマン事件
			1 = pbi_publishing_industry_events.340 #タウエル事件
		}
	}

	weight = 100
	inheritable = no
}
#報道の自由
pbi_je_freedom_of_the_press = {
	should_be_pinned_by_default = no
	icon = "gfx/interface/icons/event_icons/event_newspaper.dds"

	is_shown_when_inactive = {
		has_technology_researched = mass_communication
	}

	possible = {
		any_scope_state = {
			has_building = building_pbi_publishing_industry
		}
		NOT = {
			has_law = law_type:law_protected_speech
		}
	}

	immediate = {
		set_variable = {
			name = pbi_var_je_freedom_of_the_press
			value = 0
		}
	}

	is_progressing = {
		has_law = law_type:law_protected_speech
	}

	current_value = {
		value = var:pbi_var_je_freedom_of_the_press
	}
	
	goal_add_value = {
		add = 36 #3 years timeout
	}

	complete = {
		scope:journal_entry = {
			is_goal_complete = yes
		}
		has_law = law_type:law_protected_speech
	}
	on_complete = {
		trigger_event = {
			id = pbi_publishing_industry_events.400 #第四階級
			popup = yes
		}
	}

	on_monthly_pulse = {
		random_events = {
			50 = 0
			1 = pbi_publishing_industry_events.405 #出版社の実業家を逮捕
			1 = pbi_publishing_industry_events.410 #出版差し止め
			1 = pbi_publishing_industry_events.415 #わいせつな小説の発禁
			1 = pbi_publishing_industry_events.420 #国家機密の漏洩
			1 = pbi_publishing_industry_events.425 #反政府的な政治運動を煽る新聞
			1 = pbi_publishing_industry_events.430 #新聞は社会不安を煽っている
		}
		effect = {
			if = {
				limit = {
					has_law = law_type:law_protected_speech
				}
				change_variable = {
					name = pbi_var_je_freedom_of_the_press
					add = 1
				}
			}
		}
	}

	progressbar = yes

	weight = 100
	inheritable = no
}
